package sk.tuke.lara.masplc.agents;

/**
 * Data Transfer Object - pro prenos informaci o constraintech
 * 
 * @author MAR
 * 
 */
public class ConstraintsDTO {
    public static enum Operators {
        XeqY("=="), XgtC(">"), XgteqC(">="), XltC("<"), XlteqC("<=");

        private String txtOp;

        private Operators(String textOperator) {
            this.txtOp = textOperator;
        }

        public String getTextOperator() {
            return txtOp;
        }
    }

    private String leftOperator;
    private String rightOperator;
    private Operators operation;

    public ConstraintsDTO() {
        super();
        // jackson
    }

    public ConstraintsDTO(String leftOperator, Operators operation, String rightOperator) {
        this();
        this.leftOperator = leftOperator;
        this.rightOperator = rightOperator;
        this.operation = operation;
    }

    public String getLeftOperator() {
        return leftOperator;
    }

    public void setLeftOperator(String leftOperator) {
        this.leftOperator = leftOperator;
    }

    public String getRightOperator() {
        return rightOperator;
    }

    public void setRightOperator(String rightOperator) {
        this.rightOperator = rightOperator;
    }

    public Operators getOperation() {
        return operation;
    }

    public void setOperation(Operators operation) {
        this.operation = operation;
    }

    @Override
    public String toString() {
        return String.format("ConstraintDTO[%s %s %s]", leftOperator, operation.getTextOperator(), rightOperator);
    }
}
